package org.hcyspartnoc.luoxin.common.core.configuration;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;

@Data
@Configuration
@ConfigurationProperties(prefix = "utils")
public class UtilsConfiguration {
    private Captcha captcha;
    private File file;

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "utils.captcha")
    public static class Captcha {
        private Long imageExpires;
        private Long phoneExpires;
        private Long emailExpires;
        private Integer imageWidth;
        private Integer imageHeight;

    }

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "utils.file")
    public static class File {
        private ArrayList<String> allowedImageTypes;
    }
}
